<?php if(!defined("PATH_HD"))exit;?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>首页|兴旺化验室</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/css/style.css';?>" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/js/cufon-yui.js';?>"></script>
<script type="text/javascript" src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/js/arial.js';?>"></script>
<script type="text/javascript" src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/js/cuf_run.js';?>"></script>
<script type='text/javascript'>
		HOST = 'http://localhost';
		ROOT = 'http://localhost/company01';
		HDPHP = 'http://localhost/company01/HD';
		STATIC = 'http://localhost/company01/static';
		DATA = 'http://localhost/company01/data';
		WEB = 'http://localhost/company01/index.php';
		APP = 'http://localhost/company01/index.php/index';
		CONTROL = 'http://localhost/company01/index.php/index/index';
		METH = 'http://localhost/company01/index.php/index/index/index';
		URL = 'http://localhost/company01/index.php/index/index/index';
		ORG = 'http://localhost/company01/HD/org';
		TPL = 'http://localhost/company01/hdcms/index/tpl';
		PUBLIC = 'http://localhost/company01/hdcms/index/tpl/public';
</script>
</head>
<body>
<div class="main">
	<div class="header">
			<?php include  PATH_TPL.'/public/header.html';?>
			
	</div>
	
	<div id="login"><?php include  PATH_TPL.'/public/head.html';?></div>
	<div class="clr"></div>
	<div class="menu_nav">
		<ul>
			<li  class="active"><a href="http://localhost/company01/index.php/index/index/index">首页</a></li>
			<li><a href="http://localhost/company01/index.php/index/index/blog">动态</a></li>
			<li><a href="http://localhost/company01/index.php/index/index/support">支持</a></li>
			<li><a href="http://localhost/company01/index.php/index/index/contact">联系我们</a></li>
			<li><a href="http://localhost/company01/index.php/index/index/about">关于</a></li>
		</ul>
	</div>
	<div class="clr"></div>
    </div>
</div>

<div class="content">
    <div class="content_resize">
			<div id="l_lunhuan">
					<style type="text/css">
					#l_lunhuan{

						padding-left: 10px;
						padding-top: 10px;
					}
						#d1{
							background-color:#EEEEEE;
							width:948px;
							height:295px;
							border:solid 0 #fff;
							position:relative;
							overflow:hidden;

							}
						
						#links{
							margin-right: 400px;
							width: 120px;
							height: 5px;
							overflow: hidden;
						}
						#links a{
							text-decoration:none;
							
							display:block;
							padding:3px 6px;
							margin-top:-20px;
							margin-right:6px;
							background:#999999;
							color:#fff;
							float:left; 
							width:2px;

							text-align:center;
						_margin-top:-1px;_padding:2px 6px;_margin-right:3px;
						}
						#links a.cur{background:#61B4DD;}
					</style>
					<div id="d1">
						<div id="con"></div>
						<div id="links"></div>
					</div>
					<script type="text/javascript">
			(function(){
			var interId=timeOut = 0;//滚动定时器ID
			var imgs = ["<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/homebg.jpg';?>","<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/blogbg.jpg';?>","<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/contactbg.jpg';?>","<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/supportbg.jpg';?>","<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/aboutbg.jpg';?>"];
				var con = document.getElementById("con");
				var links = document.getElementById("links");
				var str=_linkstr="";
				var step;//稳动步长
				step=30;
				for(var i=0;i<imgs.length;i++){
					str+="<img src='"+imgs[i]+"'/>";
					_curClass = i==0?"class = 'cur'":'';
					_linkstr+="<a href='javascript:;' "+_curClass+">"+(i+1)+"</a>";
				}
				con.style.position="absolute";
				con.style.left="0px";
				con.style.width=948*imgs.length+"px";
				con.innerHTML = str;
				links.innerHTML = _linkstr;
				links.style.position="absolute";
				links.style.right="3px";
				links.style.bottom="3px";
				var aLinks = links.getElementsByTagName('a');
				for(var i=0;i<aLinks.length;i++){
						aLinks[i].onclick=(function(b){
							return function(){
								for(var j=0;j<aLinks.length;j++){
									aLinks[j].className='';	
								}
								aLinks[b].className='cur';
								var pos=newLeft=oldLeft=0;//记录con点击前位置与将要移动到的位置
								oldLeft = parseInt(con.style.left);
								newLeft = b*-1*948;
								pos = newLeft<oldLeft?-1:1;//-1 向左   1向右
								clearTimeout(timeOut);
								interId=setInterval(function(){
								con.style.left=parseInt(con.style.left)+(pos)*step+"px";
									var curLeft= parseInt(con.style.left);
										if(pos==-1 &&  curLeft<newLeft){
											con.style.left=newLeft+"px";
											clearInterval(interId);
											run(b+1);
										}else if(pos==1 &&  curLeft>newLeft){
											con.style.left=newLeft+"px";
											clearInterval(interId);
											run(b+1);
										}
								},20);
							}
						})(i);
				}
				function run(f){//定时移动setTimeout动画
						f =f>=aLinks.length?0:f;//控制不溢出alinks的个数
						timeOut =setTimeout(function(){
									aLinks[f].onclick();
						},5000);
				}
				run(1);
			})();
		</script>
					
				</div>
		
	</div>	
</div>     		       
	<div class="mainbar">
			<div class="article">
				<div class="top">最新动态</div>
				<ul style="margin-left:15px;">   
				<?php $a=1; ?>
				<?php if(!empty($row)){$listCount = count($row);$list_id=0;?><?php foreach($row as $key=>$v){?>
					<li>
					<?php echo $a++;?>
					<a href="http://localhost/company01/index.php/index/news/index/id/<?php echo $v['id'];?>"><?php echo $v['title'];?></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo date("y-m-d",$v['addtime']);?></li>
				<?php $list_id+=1;?><?php }?><?php }?>
				<!-- <lists row="6">
					
					<li>&nbsp;&nbsp;>>&nbsp;<?php echo $v['titleurl'];?></a><?php echo $v['addtime'];?></li>
			
			              
				</lists>  -->
				
			
				</ul>
			</div>
			<div id="connect">
				<div class="top">联系我们</div>
				<ul>
					<li ><s class="address"></s>江苏省兴化市戴南镇董北不锈钢市场1806室</li>
					<li><s class="tel"></s>0523-83786409 0523-83786288</li>
					<li><s class="email"></s>yooyle@yeah.net</li>
					<li><s class="qq"></s>1870192 10241266</li>
				</ul>
			</div>
			<div id="list">
				<div class="top">新进药水</div>
				
				<div id="div1" style="margin-left:50px;width:1740px;overflow:hidden; cursor:hand;" onmouseover="stop()" onmouseout="ss()">
					<ul id="img" style="width:1200px;clear:both;margin-left:20px;">
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin1.jpg';?>" width="120"/><p></p></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin2.jpg';?>" width="120"/><P></P></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin3.jpg';?>" width="120"/><p></p></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin1.jpg';?>" width="120"/><p></p></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin2.jpg';?>" width="120"/><p></p></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin3.jpg';?>" width="120"/></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin3.jpg';?>" width="120"/></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin3.jpg';?>" width="120"/></li>
						<li style="float:left;list-style:none;"><img src="<?php echo 'http://localhost/company01/hdcms/index/tpl/public/images/xinpin3.jpg';?>" width="120"/></li>
					</ul>
				</div>
				
				
<script language="javascript">
var w,h,id,speed,Html
w=870;//-------滚动容器的宽度--------//
h=180;//-------滚动容器的高度--------//
id="div1";//-------滚动容器的id--------//
direction="left";//-------滚动方向有四个值left，right，up，down，自己试试--------//
speed="100";//-------滚动速度100相当于1秒，越小越快--------//
imgDiv="img";//-------放图片的容器id--------//
HtmlL=document.getElementById(imgDiv).innerHTML;
HtmlT=document.getElementById(id).innerHTML;
switch (direction)
{
case "left":
     document.getElementById(imgDiv).innerHTML=HtmlL+HtmlL;
  break;
case "right":
     document.getElementById(imgDiv).innerHTML=HtmlL+HtmlL;
  break;
case "up":
     document.getElementById(id).innerHTML=HtmlT+HtmlT;
  break;
case "down":
     document.getElementById(id).innerHTML=HtmlT+HtmlT;
  break;
}
function ss(){
document.getElementById(id).style.width=w;
document.getElementById(id).style.height=h;
document.getElementById(imgDiv).style.width=w*2;
document.getElementById(imgDiv).style.height=h;
var ele
ele=document.getElementById("div1");
switch (direction)
{
case "left":
ele.scrollLeft=ele.scrollLeft+5;
if (ele.scrollLeft>=w)
{
ele.scrollLeft=0;
}
break;
case "right":
ele.scrollLeft=ele.scrollLeft-5;
if (ele.scrollLeft<=0)
{
ele.scrollLeft=w;
}
break;
case "up":
ele.scrollTop=ele.scrollTop+5;
if (ele.scrollTop>=h)
{
ele.scrollTop=0;
}
break;
case "down":
ele.scrollTop=ele.scrollTop-5;
if (ele.scrollTop<=0)
{
ele.scrollTop=h;
}
break;
}
t=setTimeout("ss()",speed);
}
function stop(){
document.getElementById("div1").scrollLeft=document.getElementById("div1").scrollLeft;
document.getElementById("div1").scrollTop=document.getElementById("div1").scrollTop;
     clearTimeout(t);
}
setTimeout("ss()",100);
</script>
				
			</div>
		
			<div class="clr"></div>
	</div>

  <div class="footer">
    <div class="footer_resize">
		<p class="lf">2006-2012&nbsp;&nbsp;&copy; Copyright<span>江苏兴化戴南兴旺化验室</span></p>
		<div class="clr"></div>
    </div>
  </div>

</body>
</html>
